package com.hysf.aspects;

import org.aspectj.lang.ProceedingJoinPoint;
import org.aspectj.lang.annotation.Around;
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Aspect
@Component
@Order(2)
public class MyAspect2 {
	@Pointcut ("execution(* com.hysf.project1.PersonBizImpl.addPerson(..))")
	public void p1() {}
	@Around (value = "p1()")
	public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
		System.out.println("环绕前");
		Object o = joinPoint.proceed();
		System.out.println("环绕后");
		return o;
	}
}
